<p>The <code>setUp()</code> and <code>tearDown()</code> methods (initially introduced with JUnit3 to execute a block of code before and after each
test) need to be correctly annotated with the equivalent annotation in order to preserve the same behavior when migrating from JUnit3 to JUnit4 or
JUnit5.</p>
<p>This rule consequently raise issues on <code>setUp()</code> and <code>tearDown()</code> methods which are not annotated in test classes.</p>
<h2>Noncompliant Code Example</h2>
<ul>
  <li> JUnit4: </li>
</ul>
<pre>
public void setUp() { ... } // Noncompliant; should be annotated with @Before
public void tearDown() { ... }  // Noncompliant; should be annotated with @After
</pre>
<ul>
  <li> JUnit5: </li>
</ul>
<pre>
public void setUp() { ... } // Noncompliant; should be annotated with @BeforeEach
public void tearDown() { ... }  // Noncompliant; should be annotated with @AfterEach
</pre>
<h2>Compliant Solution</h2>
<ul>
  <li> JUnit4: </li>
</ul>
<pre>
@Before
public void setUp() { ... }

@After
public void tearDown() { ... }
</pre>
<ul>
  <li> JUnit5: </li>
</ul>
<pre>
@BeforeEach
void setUp() { ... }

@AfterEach
void tearDown() { ... }
</pre>

